// 认证相关类型定义

// 登录请求参数
export interface LoginRequest {
  usernameOrEmail: string;
  password: string;
}

// 注册请求参数
export interface RegisterRequest {
  username: string;
  email: string;
  password: string;
  confirmPassword: string;
  nickname: string;
}

// 用户信息
export interface User {
  id: number;
  username: string;
  email: string;
  nickname: string;
  avatar: string | null;
  isActive: boolean;
  createdAt: string;
  updatedAt: string;
}

// 登录响应数据
export interface LoginResponse {
  accessToken: string;
  user: User;
}

// API 通用响应格式
export interface ApiResponse<T = any> {
  code: number;
  message: string;
  data: T;
  timestamp: string;
}

// 登录API响应
export type LoginApiResponse = ApiResponse<LoginResponse>;